package com.example.train.controller;

import com.example.train.common.base.model.ResponseBase;
import com.example.train.model.request.SysAdminLoginRequest;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping("/test2")
    public ResponseBase test2(@RequestParam String username,@RequestParam String password){
        Map map = new HashMap();
        map.put("k1", username);
        map.put("test2", password);
        return ResponseBase.success(map);
    }

    @PostMapping("/test3")
    public ResponseBase test3(@RequestBody SysAdminLoginRequest request){
        Map map = new HashMap();
        map.put("k1", request.getUsername());
        map.put("test3", request.getPassword());
        return ResponseBase.success(map);
    }

}
